<?php
/**
 * 提现费率设置
 * User: lxq
 * Date: 2018/4/26
 * Time: 11:54
 */
defined('InNcPHP') or exit('Access Invalid!');
class pd_tariffControl  extends SystemControl {

    public function __construct()
    {
        parent::__construct();
    }

    public function indexOp()
    {
        /* @var pd_tariffModel $pd_tariff_model*/
        $pd_tariff_model = Model('pd_tariff');
        //查询条件
        $condition = array();
        if (isset($_GET['merchant_name']) && $_GET['merchant_name']) {
            //商家名称
            $condition['merchant_name'] = $_GET['merchant_name'];
        }
        if (isset($_GET['search_merchant']) && is_numeric($_GET['search_merchant'])) {
            //商家
            $condition['merchant_id'] = intval($_GET['search_merchant']);
        }
        $tariff_list = $pd_tariff_model->getPd_tariffListPage($condition,"*",15);
        /* @var member_merchantModel $merchant_model */
        $merchant_model = Model('member_merchant');
        $merchants = $merchant_model->getMerchantList(array('mc_status'=>1), 'merchant_id,mc_shop_name');
        Tpl::output('merchants',$merchants);
        Tpl::output('tariff_list',$tariff_list);
        Tpl::output('page',$pd_tariff_model->showpage());
        Tpl::output('search',$_GET);
        Tpl::showpage('pd_tariff.index');
    }
}